package com.wxapp.stat.service.listen;

import com.wxapp.common.base.util.jackson.JacksonUtil;
import com.wxapp.stat.api.enums.listener.ListenerEnum;
import lombok.RequiredArgsConstructor;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * Description
 * @author lgl
 * DateTime  2024/2/4 9:20
 * Modified By
 */
@Component
@RequiredArgsConstructor
public class StatListen {

//    @RabbitListener(queues  = RabbitMQConstant.STATISTICAL_LOG +"custom"+RabbitMQConstant.Base_QUEUE)
    public  void saveCustomLogs(Map data) {
         var map = JacksonUtil.parseObject(data, ListenerEnum.class);
        System.out.println(map);
    }

//    @RabbitListener(queues  = RabbitMQConstant.STATISTICAL_LOG +"order"+RabbitMQConstant.Base_QUEUE)
//    public  void saveOrderLogs(ListenerEnum data) {
//        var map = JacksonUtil.parseObject(data, Map.class);
//        System.out.println(map);
//    }

//    @RabbitListener(queues  = RabbitMQConstant.STATISTICAL_LOG +"pay"+RabbitMQConstant.Base_QUEUE)
//    public  void savePayLogs(ListenerEnum data) {
//        var map = JacksonUtil.parseObject(data, Map.class);
//        System.out.println(map);
//    }
}
